const app=getApp()
Page({
  data: {   
    Wimage:'/images/icon/my_pet2.jpg',
    Wtitle:'这是标题',
    Wintro:'',
    Wtag:'',
    Wzan:'',
    Cid:'',
    heart_num:'',
    isliked:true,
    img : 'https://s3.bmp.ovh/imgs/2021/11/8f8308b8016421b4.png'
  },
  heartadd: function (){
    var that=this   
    if(that.data.isliked==true){
      this.setData({
        heart_num:that.data.heart_num+1,
        isliked:!this.data.isliked,
        img : 'https://s3.bmp.ovh/imgs/2021/11/2d7cde86aa7b7457.png'
      })
    }else{
      this.setData({
        heart_num:that.data.heart_num-1,
        isliked:!this.data.isliked,
        img :'https://s3.bmp.ovh/imgs/2021/11/8f8308b8016421b4.png'
      })
    }  
  }
})
module.exports = {
  data: Page.data
}